<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateArticlesTable extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create('articles', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('user_id')->comment('用户ID');
			$table->string('title')->comment('文章标题');
			$table->text('content')->comment('文章内容');
			$table->string('images')->comment('文章图片');
			$table->string('status')->comment('文章状态');
			$table->integer('topic_id')->comment('话题ID');
			$table->integer('column_id')->comment('栏目ID');
			$table->integer('click')->comment('点赞次数');
			$table->integer('discuss')->comment('评论次数');
			$table->integer('collection')->comment('收藏次数');
			$table->integer('concern')->comment('关注次数');
			// $table->integer('money')->comment('打赏次数');
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::drop('articles');
	}
}
